package com.ruoyi.business.task;

import com.ruoyi.business.service.SqlServerService;
import com.ruoyi.business.service.impl.TRegisterNoticeServiceImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * Sql Server 导入华山医生账号
 *
 * @author Tellsea
 * @date 2024−04−25
 */
@Slf4j
@Component("sqlServerTask")
@RequiredArgsConstructor
public class SqlServerTask {

    private final SqlServerService sqlServerService;

    private final TRegisterNoticeServiceImpl registerNoticeService;

    public void exportUser() {
        log.info("【华山导入老师 开始】");
        sqlServerService.exportUser();
        log.info("【华山导入结束 开始】");
    }

    public void updateOverLeaveDurationTask(){
        log.info("【超过14天请假的任务处理 开始】");
        registerNoticeService.overLeaveDurationHandle();
        registerNoticeService.revertOverLeaveDurationHandle();
        log.info("【超过14天请假的任务处理 结束】");
    }

}
